home *** CD-ROM | disk | FTP | other *** search
/ CU Amiga Super CD-ROM 4 / CU Amiga Magazine's Super CD-ROM 04 (1996)(EMAP Images)(GB)(Track 1 of 3)[!][issue 1996-11].iso / magazine / psion / new / spydrt.lzx / grammar.web < prev    next >
Text File  |  1996-09-20  |  5KB  |  182 lines

  1.  
  2. <opts>
  3. <isrc>keybd</isrc>
  4. <iname>INPUT</iname>
  5. <iecho>yes</iecho>
  6. <odest>screen</odest>
  7. <oname>OUTPUT</oname>
  8. <onewl>lf</onewl>
  9. <cfmt>~\n</cfmt>
  10. <citer>1</citer>
  11. <call>yes</call>
  12. <cdisp>nolist</cdisp>
  13. <rtype>fmt</rtype>
  14. <rfmt>\n******\N\n\T\n</rfmt>
  15. <rall>yes</rall>
  16. <starg>arglist</starg>
  17. <srpl></srpl>
  18. <scount>1</scount>
  19. <sout>yes</sout>
  20. <nfmt>general</nfmt>
  21. <ndec>2</ndec>
  22. <nang>degrees</nang></opts>
  23. <cell>
  24. <cname>arglist</cname>
  25. <text>A <arglist> consists of:
  26.  
  27.         nothing
  28. OR  <sexpr>
  29. OR <sexpr> "," <arglist></text></cell>
  30. <cell>
  31. <cname>builtin</cname>
  32. <text><builtin_name> "(" <arglist> ")"</text></cell>
  33. <cell>
  34. <cname>builtin_name</cname>
  35. <text>The name of one of Spyder9's builtin functions, including:
  36.     min, max, mean, abs, sign, step, sig, sin, cos, tan, asin, acos, atan, sqrt, ln, exp, log, pow, or rand.</text></cell>
  37. <cell>
  38. <cname>cellist</cname>
  39. <text>         <cellname>
  40.  OR  <cellname> "," <cellist></text></cell>
  41. <cell>
  42. <cname>cellname</cname>
  43. <text>the name of one of the cells in the web being interpreted</text></cell>
  44. <cell>
  45. <cname>cmpnd_stmt</cname>
  46. <text>A <cmpnd_stmt> is:
  47. "{" <stmtlst> "}"</text></cell>
  48. <cell>
  49. <cname>configval</cname>
  50. <text>The possible configvals are:
  51.     FORMATTED, INPTRS, OUTPTRS,TRAIL,  FIXED,  EXP, GENERAL, DEGREES, RADIANS
  52. </text></cell>
  53. <cell>
  54. <cname>configwd</cname>
  55. <text>Configuration words are special words which may be used in 'set' statements to specify system parameters to which values may be assigned.
  56.  
  57. The possible configuration words are:
  58. *  RptFmt9 -- report format (string)
  59. *  RptType9 -- report type
  60.           (FORMATTED, INPTRS, OUTPTRS, TRAIL)
  61.  *  NumFmt9 -- (FIXED, NUMERIC, GENERAL)
  62.  * NumDec9 -- expr (0-15)
  63.  * TrigUnits9 -- (DEGREES, RADIANS)
  64. </text></cell>
  65. <cell>
  66. <cname>factor</cname>
  67. <text>        <cellname>   (current value of cell pushed)
  68. OR <cellname> "!" (execute cell and push value)
  69. OR <cellname> "[" <sexpr> "]"
  70. OR <cellname>"[" <sexpr> "]" "!"
  71.     (This allows you to execute a cell by cell index)
  72. OR <number>
  73. OR "NOT" <factor>
  74. OR <sysconst>
  75. OR <builtin>
  76. OR  "(" <sexpr> ")"
  77. </text></cell>
  78. <cell>
  79. <cname>factorlist</cname>
  80. <text><factor> OR <factor>["*","/","%", OR "and"] <factorlist></text></cell>
  81. <cell>
  82. <cname>home</cname>
  83. <text>
  84. This web describes the grammar of the script language for Spyder9.
  85.  
  86. The most top level object in the language is called a
  87.  
  88.                                <script></text></cell>
  89. <cell>
  90. <cname>inlist</cname>
  91. <text>        <inspec>
  92. OR  <inspec> "," <inlist></text></cell>
  93. <cell>
  94. <cname>inspec</cname>
  95. <text>      <string>
  96. OR <cellname></text></cell>
  97. <cell>
  98. <cname>number</cname>
  99. <text>A floating pointor  number in one of the formats accepted by the Psion.</text></cell>
  100. <cell>
  101. <cname>optelse</cname>
  102. <text>      nothing
  103. OR
  104.     "else" <cmpnd_stmt>
  105. OR
  106.    "elseif" "(" <sexpr>")"<cmpnd_stmt> <optelse></text></cell>
  107. <cell>
  108. <cname>outlist</cname>
  109. <text><outspec>
  110. OR <outspec>","<outlist></text></cell>
  111. <cell>
  112. <cname>outspec</cname>
  113. <text><sexpr> 
  114. OR
  115. <string></text></cell>
  116. <cell>
  117. <cname>pexpr</cname>
  118. <text>A primary expression is:
  119.  
  120.         [  "+" or "-" or ""] <termlist></text></cell>
  121. <cell>
  122. <cname>script</cname>
  123. <text>A script is defined to be a :
  124.  
  125. <stmtlst>
  126.  
  127. </text></cell>
  128. <cell>
  129. <cname>sexpr</cname>
  130. <text>A script expression is:
  131.  
  132. <pexpr>
  133.  OR <pexpr> <relop> <pexpr>
  134.  
  135. where <relop> is one of the following:
  136.    "=", "<" , "<=",">=",">", or "<>"
  137.  
  138. NOTE:  Whenever an <sexpr> is executed as a statement, the value of the cell containing the statement is set to the value of the <sexpr>.</text></cell>
  139. <cell>
  140. <cname>stmt</cname>
  141. <text>A statement is :
  142.  
  143. <cmpnd_stmt>
  144.      OR
  145. "set" <configwd> "to" [<configval> OR <string> OR <numbr>]
  146.     OR
  147. "set" <cellname> "to" <sexpr>
  148.     OR
  149. "if" "(" <sexpr>")"  <cmpnd_stmt>  <optelse> 
  150.      OR
  151. "while" "(" <sexpr> ")"  <cmpnd_stmt>
  152.     OR
  153. "do" <cmpnd_stmt>  "while" "("<sexpr>")"
  154.     OR
  155. "for" "("<cellname> "=" <sexpr> "to"  <sexpr> [step <sexpr>]")"   <cmpnd_stmt>
  156.     OR
  157. "in" "("<inlist> ")"
  158.    OR
  159. "out" "(" <outlist> ")"
  160.    OR
  161. "report "(" <cellist>")"
  162.     OR
  163. "exit"
  164.     OR
  165. <sexpr>
  166. </text></cell>
  167. <cell>
  168. <cname>stmtlst</cname>
  169. <text>""  OR  [ <stmt>  < stmtlst> ]</text></cell>
  170. <cell>
  171. <cname>sysconst</cname>
  172. <text>The identiefier "pi", which stands for the ratio of the circumference to the diameter of a circle, or the identifier "e", which is the base of natural logarithms, or the identifier deg, which is the number of degrees per radian, or the varible eof, which is 1 if end of file has been reached on input.</text></cell>
  173. <cell>
  174. <cname>term</cname>
  175. <text>A term is defined as:
  176.          <factorlist>
  177.  
  178. </text></cell>
  179. <cell>
  180. <cname>termlist</cname>
  181. <text>Atermlist is:
  182. <term> OR [<term> ["+" OR "-" OR "or" ] <termlist></text></cell></eof>